/**
 * 
 */
package com.redside.service;

import java.util.List;

import com.redside.model.Email;

/**
 * @author PCHAPMAN
 *
 */
public interface EmailManager {
    /**
     * Saves the Email entry
     */
    public Email save(Email email);

    /**
     * Deletes the Email entry
     */
    public void delete(Email email);

    /**
     * Returns a List of all Email entries
     */
    public List<Email> findAll();
    
    /**
     * Returns the Email entry based on id
     */
    public Email findById(Long id);
    
    /**
     * Returns a List of all Email entries
     * based on email type
     */
    public List<Email> findAllByType(Long id);

    /**
     * Sends email
     * 
     * @return
     */
    public boolean sendMail(Long emailId, String countyId) throws Exception;
}